package com.service;

import com.dao.StudentDao;
import com.domain.AdminBean;
import com.domain.Grade;
import com.domain.StudentBean;

import java.util.List;

public class StudentService {
    private StudentDao studentDao = new StudentDao();

    public static List<StudentBean> selectAll() {
        return StudentDao.selectAll();
    }

    public static List<Grade> selectId(int gra) {
        return StudentDao.selectId(gra);
    }

    public static List<AdminBean> selectAd() {
        return StudentDao.selectAd();
    }

    public static void addStudent(StudentBean studentBean) {
        StudentDao.addStudent(studentBean);
    }

    public static void addGrade(Grade grade) {
        StudentDao.addGrade(grade);
    }

    public static void deleteStudent(int id) {
        StudentDao.deleteStudent(id);
    }

    public void updateStudentName(int id,String name) {
        studentDao.updateStudentName(id,name);
    }

    public void updateStudentAge(int id, int age) {
        studentDao.updateStudentAge(id,age);
    }

    public void updateStudentSex(int id, String sex) {
        studentDao.updateStudentSex(id,sex);
    }

    public void updateStudentAddress(int id, String address) {
        studentDao.updateStudentAddress(id,address);
    }

    public void updateStudentDate(int id, String birth) {
        studentDao.updateStudentDate(id,birth);
    }
}
